package com.mission.schedule.CommonViewController;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.mission.schedule.R;
import com.mission.schedule.annotation.ViewResId;
import com.mission.schedule.cutimage.Log;
import com.mission.schedule.swipexlistview.SwipeXListView;

/**
 * 分类查询的公共fragment
 * Created by liwei on 2017/4/17.
 */

public class CommonSearchTagFragment extends Fragment {

    @ViewResId(id = R.id.common_listview)
    SwipeXListView common_listview;

    private boolean isShow;// 判断是否已经显示
    Bundle bundle;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        bundle = getArguments();
        return inflater.inflate(R.layout.common_search_tag_fragment, container, false);
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        if (!hidden && !isShow) {
            isShow = true;
            init();
            loadData();
            setAdapter();
        }
    }

    private void init(){
        Log.e("TAG","search_type"+bundle.getInt("search_type"));
        Log.e("TAG","all_today"+bundle.getString("all_today"));
    }

    private void loadData(){

    }

    private void setAdapter(){

    }
}
